package com.contract.Thread;

import java.util.Observable;
import java.util.Observer;

public class Listener implements Observer {

    @Override
    public void update(Observable o, Object arg) {
        System.out.println("RunThread死");
        
        ThreadContract t1 = new ThreadContract("获取合约信息",58000); 
        t1.addObserver(this);
		Thread thread = new Thread(t1); 
		try {
			thread.sleep(60000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		thread.start();
        
        System.out.println("RunThread重启");

    }

}
